export const table_config = () => {
    const config = {
        pageSize: 10,
        pageNum: 1,
        total: 1000,
        rowKey: "roleId", //如果需要树型数据填写这个，否则为空
        defaultColumnWidth: null,//默认的列宽

        //UI
        defaultExpandAll: false, //是否默认展开所有行
        pagingShow: true,//本页1-2
        totalShow: true,//共10条数据
        paginationShow: true,//分页

        selectionChange:true, //是否支持多选
        
        buttonList: [
            {name: '刷新数据', type: 'primary', plain: true, emitLabel: 'refresh'},
            {name: '新增角色', type: 'primary', emitLabel: 'add', power:"system:dept:add"},
            {name: '删除角色', type: 'danger', emitLabel: 'delAll', power:"system:dept:remove"},
        ],
        tableList: [
            {label: '角色编号', key: 'roleId'},
            {label: '角色名称', key: 'roleName'},
            {label: '权限字符', key: 'roleKey'},
            {label: '显示顺序排序', key: 'roleSort'},
            {label: '状态', key: 'status', dicKey: "sys_normal_disable"},
            {label: '创建时间', key: 'createTime'}
        ],
        tableButton: {
            name: '操作',
            list: [
                {name: '修改', type: 'success', emitLabel: 'edit', childrenDisplay: false, power:"system:dept:edit"},
                // {name: '数据', type: 'primary', emitLabel: 'deptModify', childrenDisplay: false},
                // {name: '用户', type: 'defalut', emitLabel: 'userModify', childrenDisplay: false},
                {name: '删除', type: 'danger', emitLabel: 'delete', childrenDisplay: true, power:"system:dept:remove"}
            ]
        }
    }
    return config
}